<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let a = 10;
        let b = 2;

        console.log(`${a} + ${b} = ${a + b}`);
        console.log(`${a} - ${b} = ${a - b}`);

        let name = "张三";
        let age = "20";
        let gender = "男";

        console.log("你好, 我叫张三, 性别男, 今年20岁。");

        name = "李四";
        // +加号 拼接字符串
        console.log("你好, 我叫" + name + ", 性别" + gender + ", 今年" + age + "岁。");
        // 模板字符串（ES6新增的语法）
        console.log(`你好, 我叫${name}, 性别${gender}, 今年${age}岁。`);



    </script>
</body>

</html>